/**
 * 模拟react hooks useState写法
 */

import { ref } from 'vue'

const useState = function(defaultValue){
    let state = ref(defaultValue);
    const setHandel = function(value){
        state.value = value;
    }
    const result = [state, setHandel];
    return result;
}

export {
    useState
}